﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TianShiProject.Models.Common;
using TianShiProject.Models.Shen.PaymentShens;
using Volo.Abp.Application.Services;

namespace TianShiProject.Shen.PaymentShens
{
    public class PaymentShenService : ApplicationService
    {
        private readonly IPaymentShenRepository _paymentShenRepository1;
        public PaymentShenService(IPaymentShenRepository paymentShenRepository)
        {
            _paymentShenRepository1 = paymentShenRepository;
        }
        /// <summary>
        /// 提交审批
        /// </summary>
        /// <returns></returns>
        public async Task<int> PostAddPayment(PaymentShenDto paymentShenDto, string loginname, int? loginid)
        {
            return await _paymentShenRepository1.PostAddPayment(paymentShenDto, loginname, loginid);
        }
        /// <summary>
        /// 显示审批
        /// </summary>
        /// <param name="title"></param>
        /// <param name="danwei"></param>
        /// <param name="fuzeren"></param>
        /// <param name="jingbanren"></param>
        /// <param name="qianding"></param>
        /// <returns></returns>
        public async Task<PageResponse<PaymentShenDto>> GetShowPayment(string title, int? state, string fuzeren, string jingbanren, DateTime? qianding, int pageindex = 1, int pagesize = 3)
        {
            return await _paymentShenRepository1.GetShowPayment(title, state, fuzeren, jingbanren, qianding, pageindex, pagesize);
        }
        /// <summary>
        /// 待审批显示
        /// </summary>
        /// <param name="title"></param>
        /// <param name="danwei"></param>
        /// <param name="fuzeren"></param>
        /// <param name="jingbanren"></param>
        /// <param name="qianding"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<PaymentShenDto>> GetDaiPayment(string title, int? state, string fuzeren, string jingbanren, DateTime? qianding, int pageindex = 1, int pagesize = 3)
        {
            return await _paymentShenRepository1.GetDaiPayment(title, state, fuzeren, jingbanren, qianding, pageindex, pagesize);
        }
        /// <summary>
        /// 已审批显示
        /// </summary>
        /// <param name="title"></param>
        /// <param name="danwei"></param>
        /// <param name="fuzeren"></param>
        /// <param name="jingbanren"></param>
        /// <param name="qianding"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<PaymentShenDto>> GetYiPayment(string title, int? state, string fuzeren, string jingbanren, DateTime? qianding, int pageindex = 1, int pagesize = 3)
        {
            return await _paymentShenRepository1.GetYiPayment(title, state, fuzeren, jingbanren, qianding, pageindex, pagesize);
        }
        /// <summary>
        /// 审批通过
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> PutTongPayment(Guid id)
        {
            return await _paymentShenRepository1.PutTongPayment(id);
        }
        /// <summary>
        /// 审批拒绝
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> PutJuPayment(Guid id)
        {
            return await _paymentShenRepository1.PutJuPayment(id);
        }
    }
}
